package com.ykzhujiang.lovespirit.entity;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class LSUser {

	public static final int TYPE_REG = 0;
	public static final int TYPE_UNREG = 1;
	@PrimaryKey
	@Persistent
	private String email;

	@Persistent(defaultFetchGroup="true")
	private User user;

	@Persistent
	private Date date;

	@Persistent
	private Date sendDate;

	@Persistent
	private Integer type;

	public LSUser(String email, User user, Date date, Date sdate, Integer type) {
		this.email = email;
		this.user = user;
		this.date = date;
		this.type = type;
		this.sendDate = sdate;
	}

	public String getEmail() {
		return email;
	}

	public User getUser() {
		return user;
	}

	public Date getDate() {
		return date;
	}

	public Date getSendDate() {
		return sendDate;
	}

	public Integer getType() {
		return type;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public void setSendDate(Date date) {
		this.sendDate = date;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public void setEmail(String email) {
		this.email = email;
	}
}